<!DOCTYPE html>
<html lang="zh-CN" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>运行时 API 示例 | VitePress基础框架</title>
    <meta name="description" content="VitePress基础框架的站点描述">
    <meta name="generator" content="VitePress v1.3.4">
    <link rel="preload stylesheet" href="/vitepress-template-public/assets/style.Bh2VXVad.css" as="style">
    <script type="module" src="/vitepress-template-public/assets/chunks/metadata.6b2f4039.js"></script>
    <script type="module" src="/vitepress-template-public/assets/app.CtFKj54A.js"></script>
    <link rel="preload" href="/vitepress-template-public/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
    <link rel="modulepreload" href="/vitepress-template-public/assets/chunks/theme.CHXT_227.js">
    <link rel="modulepreload" href="/vitepress-template-public/assets/chunks/framework.BCtciejH.js">
    <link rel="modulepreload" href="/vitepress-template-public/assets/examples_api.md.C5CmD7IQ.lean.js">
    <link rel="icon" type="image/svg+xml" href="/vitepress-template-public/logo/vitepress-logo-mini.svg">
    <link rel="icon" type="image/png" href="/vitepress-template-public/logo/vitepress-logo-mini.png">
    <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
    <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
  </head>
  <body>
    <div id="app"><div class="Layout" data-v-e7ae3156><!--[--><!--]--><!--[--><span tabindex="-1" data-v-b6dc82ed></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-b6dc82ed> Skip to content </a><!--]--><!----><header class="VPNav" data-v-e7ae3156 data-v-dd74d679><div class="VPNavBar" data-v-dd74d679 data-v-f294b04e><div class="wrapper" data-v-f294b04e><div class="container" data-v-f294b04e><div class="title" data-v-f294b04e><div class="VPNavBarTitle has-sidebar" data-v-f294b04e data-v-612ad8f1><a class="title" href="/vitepress-template-public/" data-v-612ad8f1><!--[--><!--]--><!--[--><img class="VPImage logo" src="/vitepress-template-public/logo/vitepress-logo-mini.svg" width="24" height="24" alt data-v-50300c68><!--]--><span data-v-612ad8f1>VitePress基础框架</span><!--[--><!--]--></a></div></div><div class="content" data-v-f294b04e><div class="content-body" data-v-f294b04e><!--[--><!--]--><div class="VPNavBarSearch search" data-v-f294b04e><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="搜索文档"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">搜索文档</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-f294b04e data-v-fa8254e6><span id="main-nav-aria-label" class="visually-hidden" data-v-fa8254e6> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/vitepress-template-public/guide/install" tabindex="0" data-v-fa8254e6 data-v-8b7bfc54><!--[--><span data-v-8b7bfc54>教程</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/vitepress-template-public/examples/markdown" tabindex="0" data-v-fa8254e6 data-v-8b7bfc54><!--[--><span data-v-8b7bfc54>示例</span><!--]--></a><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-fa8254e6 data-v-e261b7a7><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-e261b7a7><span class="text" data-v-e261b7a7><!----><span data-v-e261b7a7>下拉导航</span><span class="vpi-chevron-down text-icon" data-v-e261b7a7></span></span></button><div class="menu" data-v-e261b7a7><div class="VPMenu" data-v-e261b7a7 data-v-0430342e><div class="items" data-v-0430342e><!--[--><!--[--><div class="VPMenuGroup" data-v-0430342e data-v-11db401e><p class="title" data-v-11db401e>下拉导航标题</p><!--[--><!--[--><div class="VPMenuLink" data-v-11db401e data-v-3da97ee6><a class="VPLink link vp-external-link-icon" href="https://github.com/dcdy/vitepress-template/edit/main/docs/.vitepress/config.mts" target="_blank" rel="noreferrer" data-v-3da97ee6><!--[-->子项A<!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-11db401e data-v-3da97ee6><a class="VPLink link vp-external-link-icon" href="https://gitee.com/xia_mei_ting/vitepress-template/blob/main/docs/.vitepress/config.mts" target="_blank" rel="noreferrer" data-v-3da97ee6><!--[-->子项B<!--]--></a></div><!--]--><!--]--></div><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-fa8254e6 data-v-e261b7a7><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-e261b7a7><span class="text" data-v-e261b7a7><!----><span data-v-e261b7a7>设置</span><span class="vpi-chevron-down text-icon" data-v-e261b7a7></span></span></button><div class="menu" data-v-e261b7a7><div class="VPMenu" data-v-e261b7a7 data-v-0430342e><div class="items" data-v-0430342e><!--[--><!--[--><!----><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-f294b04e data-v-cfa3e56c><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-cfa3e56c data-v-534bc2ea data-v-48850b97><span class="check" data-v-48850b97><span class="icon" data-v-48850b97><!--[--><span class="vpi-sun sun" data-v-534bc2ea></span><span class="vpi-moon moon" data-v-534bc2ea></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-f294b04e data-v-dcbce86c data-v-46044fd4><!--[--><a class="VPSocialLink no-icon" href="https://github.com/dcdy/vitepress-template" aria-label="github" target="_blank" rel="noopener" data-v-46044fd4 data-v-add20255><span class="vpi-social-github" /></a><a class="VPSocialLink no-icon" href="https://gitee.com/xia_mei_ting/vitepress-template" aria-label target="_blank" rel="noopener" data-v-46044fd4 data-v-add20255><svg t="1727428813465" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2268" width="200" height="200"><path d="M512 1024C229.222 1024 0 794.778 0 512S229.222 0 512 0s512 229.222 512 512-229.222 512-512 512z m259.149-568.883h-290.74a25.293 25.293 0 0 0-25.292 25.293l-0.026 63.206c0 13.952 11.315 25.293 25.267 25.293h177.024c13.978 0 25.293 11.315 25.293 25.267v12.646a75.853 75.853 0 0 1-75.853 75.853h-240.23a25.293 25.293 0 0 1-25.267-25.293V417.203a75.853 75.853 0 0 1 75.827-75.853h353.946a25.293 25.293 0 0 0 25.267-25.292l0.077-63.207a25.293 25.293 0 0 0-25.268-25.293H417.152a189.62 189.62 0 0 0-189.62 189.645V771.15c0 13.977 11.316 25.293 25.294 25.293h372.94a170.65 170.65 0 0 0 170.65-170.65V480.384a25.293 25.293 0 0 0-25.293-25.267z" fill="#C71D23" p-id="2269"></path></svg></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-f294b04e data-v-be29ddb3 data-v-e261b7a7><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-e261b7a7><span class="vpi-more-horizontal icon" data-v-e261b7a7></span></button><div class="menu" data-v-e261b7a7><div class="VPMenu" data-v-e261b7a7 data-v-0430342e><!----><!--[--><!--[--><!----><div class="group" data-v-be29ddb3><div class="item appearance" data-v-be29ddb3><p class="label" data-v-be29ddb3>主题</p><div class="appearance-action" data-v-be29ddb3><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-be29ddb3 data-v-534bc2ea data-v-48850b97><span class="check" data-v-48850b97><span class="icon" data-v-48850b97><!--[--><span class="vpi-sun sun" data-v-534bc2ea></span><span class="vpi-moon moon" data-v-534bc2ea></span><!--]--></span></span></button></div></div></div><div class="group" data-v-be29ddb3><div class="item social-links" data-v-be29ddb3><div class="VPSocialLinks social-links-list" data-v-be29ddb3 data-v-46044fd4><!--[--><a class="VPSocialLink no-icon" href="https://github.com/dcdy/vitepress-template" aria-label="github" target="_blank" rel="noopener" data-v-46044fd4 data-v-add20255><span class="vpi-social-github" /></a><a class="VPSocialLink no-icon" href="https://gitee.com/xia_mei_ting/vitepress-template" aria-label target="_blank" rel="noopener" data-v-46044fd4 data-v-add20255><svg t="1727428813465" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2268" width="200" height="200"><path d="M512 1024C229.222 1024 0 794.778 0 512S229.222 0 512 0s512 229.222 512 512-229.222 512-512 512z m259.149-568.883h-290.74a25.293 25.293 0 0 0-25.292 25.293l-0.026 63.206c0 13.952 11.315 25.293 25.267 25.293h177.024c13.978 0 25.293 11.315 25.293 25.267v12.646a75.853 75.853 0 0 1-75.853 75.853h-240.23a25.293 25.293 0 0 1-25.267-25.293V417.203a75.853 75.853 0 0 1 75.827-75.853h353.946a25.293 25.293 0 0 0 25.267-25.292l0.077-63.207a25.293 25.293 0 0 0-25.268-25.293H417.152a189.62 189.62 0 0 0-189.62 189.645V771.15c0 13.977 11.316 25.293 25.294 25.293h372.94a170.65 170.65 0 0 0 170.65-170.65V480.384a25.293 25.293 0 0 0-25.293-25.267z" fill="#C71D23" p-id="2269"></path></svg></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-f294b04e data-v-63d80599><span class="container" data-v-63d80599><span class="top" data-v-63d80599></span><span class="middle" data-v-63d80599></span><span class="bottom" data-v-63d80599></span></span></button></div></div></div></div><div class="divider" data-v-f294b04e><div class="divider-line" data-v-f294b04e></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-e7ae3156 data-v-3a585b62><div class="container" data-v-3a585b62><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-3a585b62><span class="vpi-align-left menu-icon" data-v-3a585b62></span><span class="menu-text" data-v-3a585b62>菜单</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-3a585b62 data-v-d6887fce><button data-v-d6887fce>回到顶部</button><!----></div></div></div><aside class="VPSidebar" data-v-e7ae3156 data-v-dbec4220><div class="curtain" data-v-dbec4220></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-dbec4220><span class="visually-hidden" id="sidebar-aria-label" data-v-dbec4220> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-3fb65e2d><section class="VPSidebarItem level-0 has-active" data-v-3fb65e2d data-v-9529bbf6><div class="item" role="button" tabindex="0" data-v-9529bbf6><div class="indicator" data-v-9529bbf6></div><h2 class="text" data-v-9529bbf6>示例</h2><!----></div><div class="items" data-v-9529bbf6><!--[--><section class="VPSidebarItem level-1" data-v-9529bbf6 data-v-9529bbf6><div class="item" role="button" tabindex="0" data-v-9529bbf6><div class="indicator" data-v-9529bbf6></div><h3 class="text" data-v-9529bbf6>Markdown</h3><!----></div><div class="items" data-v-9529bbf6><!--[--><div class="VPSidebarItem level-2 is-link" data-v-9529bbf6 data-v-9529bbf6><div class="item" data-v-9529bbf6><div class="indicator" data-v-9529bbf6></div><a class="VPLink link link" href="/vitepress-template-public/examples/markdown" data-v-9529bbf6><!--[--><p class="text" data-v-9529bbf6>基础示例</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-9529bbf6 data-v-9529bbf6><div class="item" data-v-9529bbf6><div class="indicator" data-v-9529bbf6></div><a class="VPLink link link" href="/vitepress-template-public/examples/markdown-expand" data-v-9529bbf6><!--[--><p class="text" data-v-9529bbf6>扩展示例</p><!--]--></a><!----></div><!----></div><!--]--></div></section><div class="VPSidebarItem level-1 is-link" data-v-9529bbf6 data-v-9529bbf6><div class="item" data-v-9529bbf6><div class="indicator" data-v-9529bbf6></div><a class="VPLink link link" href="/vitepress-template-public/examples/api" data-v-9529bbf6><!--[--><p class="text" data-v-9529bbf6>API</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-e7ae3156 data-v-9d495596><div class="VPDoc has-sidebar has-aside" data-v-9d495596 data-v-09fc73c3><!--[--><!--]--><div class="container" data-v-09fc73c3><div class="aside" data-v-09fc73c3><div class="aside-curtain" data-v-09fc73c3></div><div class="aside-container" data-v-09fc73c3><div class="aside-content" data-v-09fc73c3><div class="VPDocAside" data-v-09fc73c3 data-v-f2095285><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-f2095285 data-v-5ec4093d><div class="content" data-v-5ec4093d><div class="outline-marker" data-v-5ec4093d></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-5ec4093d>页面导航</div><ul class="VPDocOutlineItem root" data-v-5ec4093d data-v-31939393><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-f2095285></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-09fc73c3><div class="content-container" data-v-09fc73c3><!--[--><!--]--><main class="main" data-v-09fc73c3><div style="position:relative;" class="vp-doc _vitepress-template-public_examples_api external-link-icon-enabled" data-v-09fc73c3><div><h1 id="运行时-api-示例" tabindex="-1">运行时 API 示例 <a class="header-anchor" href="#运行时-api-示例" aria-label="Permalink to &quot;运行时 API 示例&quot;">​</a></h1><p>此页面演示了 VitePress 提供的某些运行时 API 的用法。</p><p>主要的 <code>useData（）</code> API 可以用于访问当前页面的站点、主题和页面数据。它在 <code>.md</code> 和 <code>.vue</code> 文件中都可以使用：</p><div class="language-md vp-adaptive-theme line-numbers-mode"><button title="复制代码" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes OneLight dark-plus vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&lt;</span><span style="--shiki-light:#E45649;--shiki-dark:#569CD6;">script</span><span style="--shiki-light:#986801;--shiki-dark:#9CDCFE;"> setup</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&gt;</span></span>
<span class="line"><span style="--shiki-light:#A626A4;--shiki-dark:#C586C0;">import</span><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;"> { </span><span style="--shiki-light:#E45649;--shiki-dark:#9CDCFE;">useData</span><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;"> } </span><span style="--shiki-light:#A626A4;--shiki-dark:#C586C0;">from</span><span style="--shiki-light:#50A14F;--shiki-dark:#CE9178;"> &#39;vitepress&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#A626A4;--shiki-dark:#569CD6;">const</span><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;"> { </span><span style="--shiki-light:#986801;--shiki-dark:#4FC1FF;">theme</span><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;">, </span><span style="--shiki-light:#986801;--shiki-dark:#4FC1FF;">page</span><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;">, </span><span style="--shiki-light:#986801;--shiki-dark:#4FC1FF;">frontmatter</span><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;"> } </span><span style="--shiki-light:#0184BC;--shiki-dark:#D4D4D4;">=</span><span style="--shiki-light:#4078F2;--shiki-dark:#DCDCAA;"> useData</span><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;">()</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&lt;/</span><span style="--shiki-light:#E45649;--shiki-dark:#569CD6;">script</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#569CD6;--shiki-light-font-weight:inherit;--shiki-dark-font-weight:bold;">## 结果</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#569CD6;--shiki-light-font-weight:inherit;--shiki-dark-font-weight:bold;">### 主题数据</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&lt;</span><span style="--shiki-light:#E45649;--shiki-dark:#569CD6;">pre</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&gt;</span><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;">{{ theme }}</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&lt;/</span><span style="--shiki-light:#E45649;--shiki-dark:#569CD6;">pre</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;">### 页面数据</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&lt;</span><span style="--shiki-light:#E45649;--shiki-dark:#569CD6;">pre</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&gt;</span><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;">{{ page }}</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&lt;/</span><span style="--shiki-light:#E45649;--shiki-dark:#569CD6;">pre</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;">### 页面 Frontmatter</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&lt;</span><span style="--shiki-light:#E45649;--shiki-dark:#569CD6;">pre</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&gt;</span><span style="--shiki-light:#383A42;--shiki-dark:#D4D4D4;">{{ frontmatter }}</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&lt;/</span><span style="--shiki-light:#E45649;--shiki-dark:#569CD6;">pre</span><span style="--shiki-light:#383A42;--shiki-dark:#808080;">&gt;</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br></div></div><h2 id="结果" tabindex="-1">结果 <a class="header-anchor" href="#结果" aria-label="Permalink to &quot;结果&quot;">​</a></h2><h3 id="主题数据" tabindex="-1">主题数据 <a class="header-anchor" href="#主题数据" aria-label="Permalink to &quot;主题数据&quot;">​</a></h3><div style="overflow:auto;"><pre>{
  &quot;logo&quot;: {
    &quot;src&quot;: &quot;/logo/vitepress-logo-mini.svg&quot;,
    &quot;width&quot;: 24,
    &quot;height&quot;: 24
  },
  &quot;siteTitle&quot;: &quot;VitePress基础框架&quot;,
  &quot;nav&quot;: [
    {
      &quot;text&quot;: &quot;教程&quot;,
      &quot;link&quot;: &quot;/guide/install&quot;,
      &quot;activeMatch&quot;: &quot;/guide&quot;
    },
    {
      &quot;text&quot;: &quot;示例&quot;,
      &quot;link&quot;: &quot;/examples/markdown&quot;,
      &quot;activeMatch&quot;: &quot;/examples&quot;
    },
    {
      &quot;text&quot;: &quot;下拉导航&quot;,
      &quot;items&quot;: [
        {
          &quot;text&quot;: &quot;下拉导航标题&quot;,
          &quot;items&quot;: [
            {
              &quot;text&quot;: &quot;子项A&quot;,
              &quot;link&quot;: &quot;https://github.com/dcdy/vitepress-template/edit/main/docs/.vitepress/config.mts&quot;
            },
            {
              &quot;text&quot;: &quot;子项B&quot;,
              &quot;link&quot;: &quot;https://gitee.com/xia_mei_ting/vitepress-template/blob/main/docs/.vitepress/config.mts&quot;
            }
          ]
        }
      ]
    },
    {
      &quot;text&quot;: &quot;设置&quot;,
      &quot;items&quot;: [
        {
          &quot;component&quot;: &quot;ConfigSet&quot;,
          &quot;props&quot;: {
            &quot;title&quot;: &quot;设置&quot;
          }
        }
      ]
    }
  ],
  &quot;sidebar&quot;: {
    &quot;/guide&quot;: {
      &quot;base&quot;: &quot;/guide&quot;,
      &quot;items&quot;: [
        {
          &quot;text&quot;: &quot;简介&quot;,
          &quot;collapsed&quot;: false,
          &quot;items&quot;: [
            {
              &quot;text&quot;: &quot;安装&quot;,
              &quot;link&quot;: &quot;/install&quot;
            },
            {
              &quot;text&quot;: &quot;配置&quot;,
              &quot;collapsed&quot;: false,
              &quot;items&quot;: [
                {
                  &quot;text&quot;: &quot;首页配置&quot;,
                  &quot;link&quot;: &quot;/config-home&quot;
                },
                {
                  &quot;text&quot;: &quot;文档配置&quot;,
                  &quot;link&quot;: &quot;/config-doc&quot;
                },
                {
                  &quot;text&quot;: &quot;其他配置&quot;,
                  &quot;link&quot;: &quot;/config-other&quot;
                }
              ]
            },
            {
              &quot;text&quot;: &quot;布局插槽&quot;,
              &quot;link&quot;: &quot;/layout-slot&quot;
            }
          ]
        },
        {
          &quot;text&quot;: &quot;插件&quot;,
          &quot;base&quot;: &quot;/guide/plugin&quot;,
          &quot;collapsed&quot;: false,
          &quot;items&quot;: [
            {
              &quot;text&quot;: &quot;图片&quot;,
              &quot;link&quot;: &quot;/image&quot;
            },
            {
              &quot;text&quot;: &quot;代码块&quot;,
              &quot;link&quot;: &quot;/code&quot;
            },
            {
              &quot;text&quot;: &quot;样式美化&quot;,
              &quot;link&quot;: &quot;/style&quot;
            },
            {
              &quot;text&quot;: &quot;一些组件&quot;,
              &quot;link&quot;: &quot;/util&quot;
            }
          ]
        },
        {
          &quot;text&quot;: &quot;部署&quot;,
          &quot;collapsed&quot;: false,
          &quot;items&quot;: [
            {
              &quot;text&quot;: &quot;Github Pages&quot;,
              &quot;link&quot;: &quot;/github-pages&quot;
            }
          ]
        }
      ]
    },
    &quot;/examples&quot;: {
      &quot;base&quot;: &quot;/examples&quot;,
      &quot;items&quot;: [
        {
          &quot;text&quot;: &quot;示例&quot;,
          &quot;items&quot;: [
            {
              &quot;text&quot;: &quot;Markdown&quot;,
              &quot;items&quot;: [
                {
                  &quot;text&quot;: &quot;基础示例&quot;,
                  &quot;link&quot;: &quot;/markdown&quot;
                },
                {
                  &quot;text&quot;: &quot;扩展示例&quot;,
                  &quot;link&quot;: &quot;/markdown-expand&quot;
                }
              ]
            },
            {
              &quot;text&quot;: &quot;API&quot;,
              &quot;link&quot;: &quot;/api&quot;
            }
          ]
        }
      ]
    }
  },
  &quot;outline&quot;: {
    &quot;level&quot;: [
      2,
      3
    ],
    &quot;label&quot;: &quot;页面导航&quot;
  },
  &quot;editLink&quot;: {
    &quot;pattern&quot;: &quot;https://github.com/dcdy/vitepress-template/edit/main/docs/:path&quot;,
    &quot;text&quot;: &quot;在 GitHub 上编辑此页面&quot;
  },
  &quot;lastUpdated&quot;: {
    &quot;text&quot;: &quot;最后更新于&quot;,
    &quot;formatOptions&quot;: {
      &quot;dateStyle&quot;: &quot;short&quot;,
      &quot;timeStyle&quot;: &quot;short&quot;
    }
  },
  &quot;docFooter&quot;: {
    &quot;prev&quot;: &quot;上一页&quot;,
    &quot;next&quot;: &quot;下一页&quot;
  },
  &quot;footer&quot;: {
    &quot;message&quot;: &quot;基于MIT许可发布&quot;,
    &quot;copyright&quot;: &quot;版权所有 © 2024 dcdyxmt@163.com&quot;
  },
  &quot;socialLinks&quot;: [
    {
      &quot;icon&quot;: &quot;github&quot;,
      &quot;link&quot;: &quot;https://github.com/dcdy/vitepress-template&quot;
    },
    {
      &quot;icon&quot;: {
        &quot;svg&quot;: &quot;&lt;svg t=\&quot;1727428813465\&quot; class=\&quot;icon\&quot; viewBox=\&quot;0 0 1024 1024\&quot; version=\&quot;1.1\&quot; xmlns=\&quot;http://www.w3.org/2000/svg\&quot; p-id=\&quot;2268\&quot; width=\&quot;200\&quot; height=\&quot;200\&quot;&gt;&lt;path d=\&quot;M512 1024C229.222 1024 0 794.778 0 512S229.222 0 512 0s512 229.222 512 512-229.222 512-512 512z m259.149-568.883h-290.74a25.293 25.293 0 0 0-25.292 25.293l-0.026 63.206c0 13.952 11.315 25.293 25.267 25.293h177.024c13.978 0 25.293 11.315 25.293 25.267v12.646a75.853 75.853 0 0 1-75.853 75.853h-240.23a25.293 25.293 0 0 1-25.267-25.293V417.203a75.853 75.853 0 0 1 75.827-75.853h353.946a25.293 25.293 0 0 0 25.267-25.292l0.077-63.207a25.293 25.293 0 0 0-25.268-25.293H417.152a189.62 189.62 0 0 0-189.62 189.645V771.15c0 13.977 11.316 25.293 25.294 25.293h372.94a170.65 170.65 0 0 0 170.65-170.65V480.384a25.293 25.293 0 0 0-25.293-25.267z\&quot; fill=\&quot;#C71D23\&quot; p-id=\&quot;2269\&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&quot;
      },
      &quot;link&quot;: &quot;https://gitee.com/xia_mei_ting/vitepress-template&quot;
    }
  ],
  &quot;returnToTopLabel&quot;: &quot;回到顶部&quot;,
  &quot;sidebarMenuLabel&quot;: &quot;菜单&quot;,
  &quot;darkModeSwitchLabel&quot;: &quot;主题&quot;,
  &quot;lightModeSwitchTitle&quot;: &quot;切换到浅色模式&quot;,
  &quot;darkModeSwitchTitle&quot;: &quot;切换到深色模式&quot;,
  &quot;externalLinkIcon&quot;: true,
  &quot;search&quot;: {
    &quot;provider&quot;: &quot;local&quot;,
    &quot;options&quot;: {
      &quot;translations&quot;: {
        &quot;button&quot;: {
          &quot;buttonText&quot;: &quot;搜索文档&quot;,
          &quot;buttonAriaLabel&quot;: &quot;搜索文档&quot;
        },
        &quot;modal&quot;: {
          &quot;noResultsText&quot;: &quot;无法找到相关结果&quot;,
          &quot;resetButtonTitle&quot;: &quot;清除查询条件&quot;,
          &quot;displayDetails&quot;: &quot;显示详情&quot;,
          &quot;backButtonTitle&quot;: &quot;返回&quot;,
          &quot;footer&quot;: {
            &quot;selectText&quot;: &quot;选择&quot;,
            &quot;navigateText&quot;: &quot;切换&quot;,
            &quot;closeText&quot;: &quot;关闭&quot;
          }
        }
      }
    }
  }
}</pre></div><h3 id="页面数据" tabindex="-1">页面数据 <a class="header-anchor" href="#页面数据" aria-label="Permalink to &quot;页面数据&quot;">​</a></h3><div style="overflow:auto;"><pre>{
  &quot;title&quot;: &quot;运行时 API 示例&quot;,
  &quot;description&quot;: &quot;&quot;,
  &quot;frontmatter&quot;: {
    &quot;outline&quot;: &quot;deep&quot;
  },
  &quot;headers&quot;: [],
  &quot;relativePath&quot;: &quot;examples/api.md&quot;,
  &quot;filePath&quot;: &quot;examples/api.md&quot;,
  &quot;lastUpdated&quot;: 1735120526000
}</pre></div><h3 id="页面-frontmatter" tabindex="-1">页面 Frontmatter <a class="header-anchor" href="#页面-frontmatter" aria-label="Permalink to &quot;页面 Frontmatter&quot;">​</a></h3><div style="overflow:auto;"><pre>{
  &quot;outline&quot;: &quot;deep&quot;
}</pre></div><h2 id="更多" tabindex="-1">更多 <a class="header-anchor" href="#更多" aria-label="Permalink to &quot;更多&quot;">​</a></h2><p>查看文档中的 <a href="https://vitepress.dev/reference/runtime-api#usedata" target="_blank" rel="noreferrer">运行时 API 的完整列表</a>.</p></div></div></main><footer class="VPDocFooter" data-v-09fc73c3 data-v-a242629a><!--[--><!--[--><!--[--><!--[--><div style="display:none;" class="vitepress-backTop-main" title="返回顶部" data-v-62b2871c><svg t="1720595052079" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4279" width="200" height="200" data-v-62b2871c><path d="M752.736 431.063C757.159 140.575 520.41 8.97 504.518 0.41V0l-0.45 0.205-0.41-0.205v0.41c-15.934 8.56-252.723 140.165-248.259 430.653-48.21 31.457-98.713 87.368-90.685 184.074 8.028 96.666 101.007 160.768 136.601 157.287 35.595-3.482 25.232-30.31 25.232-30.31l12.206-50.095s52.47 80.569 69.304 80.528c15.114-1.23 87-0.123 95.6 0h0.82c8.602-0.123 80.486-1.23 95.6 0 16.794 0 69.305-80.528 69.305-80.528l12.165 50.094s-10.322 26.83 25.272 30.31c35.595 3.482 128.574-60.62 136.602-157.286 8.028-96.665-42.475-152.617-90.685-184.074z m-248.669-4.26c-6.758-0.123-94.781-3.359-102.891-107.192 2.95-98.714 95.97-107.438 102.891-107.93 6.964 0.492 99.943 9.216 102.892 107.93-8.11 103.833-96.174 107.07-102.892 107.192z m-52.019 500.531c0 11.838-9.42 21.382-21.012 21.382a21.217 21.217 0 0 1-21.054-21.34V821.74c0-11.797 9.421-21.382 21.054-21.382 11.591 0 21.012 9.585 21.012 21.382v105.635z m77.333 57.222a21.504 21.504 0 0 1-21.34 21.626 21.504 21.504 0 0 1-21.34-21.626V827.474c0-11.96 9.543-21.668 21.299-21.668 11.796 0 21.38 9.708 21.38 21.668v157.082z m71.147-82.043c0 11.796-9.42 21.34-21.053 21.34a21.217 21.217 0 0 1-21.013-21.34v-75.367c0-11.755 9.421-21.299 21.013-21.299 11.632 0 21.053 9.544 21.053 21.3v75.366z" fill="#FFF" p-id="4280" data-v-62b2871c></path></svg></div><!--]--><!--]--><!--]--><!--]--><div class="edit-info" data-v-a242629a><div class="edit-link" data-v-a242629a><a class="VPLink link vp-external-link-icon no-icon edit-link-button" href="https://github.com/dcdy/vitepress-template/edit/main/docs/examples/api.md" target="_blank" rel="noreferrer" data-v-a242629a><!--[--><span class="vpi-square-pen edit-link-icon" data-v-a242629a></span> 在 GitHub 上编辑此页面<!--]--></a></div><div class="last-updated" data-v-a242629a><p class="VPLastUpdated" data-v-a242629a data-v-6712e2c8>最后更新于: <time datetime="2024-12-25T09:55:26.000Z" data-v-6712e2c8></time></p></div></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-a242629a><span class="visually-hidden" id="doc-footer-aria-label" data-v-a242629a>Pager</span><div class="pager" data-v-a242629a><a class="VPLink link pager-link prev" href="/vitepress-template-public/examples/markdown-expand" data-v-a242629a><!--[--><span class="desc" data-v-a242629a>上一页</span><span class="title" data-v-a242629a>扩展示例</span><!--]--></a></div><div class="pager" data-v-a242629a><!----></div></nav></footer><!--[--><!--[--><!--[--><!----><!--]--><!--]--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-e7ae3156 data-v-34aa0b55><div class="container" data-v-34aa0b55><p class="message" data-v-34aa0b55>基于MIT许可发布</p><p class="copyright" data-v-34aa0b55>版权所有 © 2024 dcdyxmt@163.com</p></div></footer><!--[--><!--]--></div></div>
    
    
  </body>
</html>